import fetch from '@/utils/fetch'

//这样写是因为可以支持import，但是好像不知道单个方法inport
export default {
  async login(data) {
    return await fetch({
      url: '/account/login',
      method: 'post',
      data,
    })
  },

  async loginDD(data) {
    return await fetch({
      url: '/account/loginDD',
      method: 'post',
      data,
    })
  },

  async logout() {
    return await fetch({
      url: '/account/logout',
      method: 'post',
    })
  },

  async getUserInfo() {
    return await fetch({
      url: '/user/getUserInfo',
      method: 'post',
    })
  },

  async page(data) {
    return await fetch({
      url: '/user/ ',
      method: 'post',
      data
    })
  },

  async setRole(data) {
    return await fetch({
      url: '/user/setRole',
      method: 'post',
      data,
    })
  },

  async findAll(data) {
    return await fetch({
      url: '/table/user/findAll',
      method: 'post',
      data
    })
  },

  async asyncUser(data) {
    return await fetch({
      url: '/account/async',
      method: 'post',
      data
    })
  },

  async findDept(data) {
    return await fetch({
      url: '/table/dept/findAll',
      method: 'post',
      data
    })
  },
}
